//
//  UIButton+YJCategory.m
//  Rail
//
//  Created by hychen on 2018/2/26.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "UIButton+YJCategory.h"

@implementation UIButton (YJCategory)

+ (UIButton *)buttonWithTitle:(NSString *)title titleColor:(UIColor *)titleColor norImage:(UIImage *)norImage highImage:(UIImage *)highImage action:(SEL)action owner:(id)owner
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:titleColor forState:UIControlStateNormal];
    [button setBackgroundImage:norImage forState:UIControlStateNormal];
    [button setBackgroundImage:highImage forState:UIControlStateHighlighted];
    [button addTarget:owner action:action forControlEvents:UIControlEventTouchUpInside];
    return button;
}

@end
